import request from '@/utils/request'

// 查询客户订单列表
export function listOrders(query) {
  return request({
    url: '/service/orders/list',
    method: 'get',
    params: query
  })
}

// 查询客户订单详细
export function getOrders(id) {
  return request({
    url: '/service/orders/' + id,
    method: 'get'
  })
}

// 新增客户订单
export function addOrders(data) {
  return request({
    url: '/service/orders',
    method: 'post',
    data: data
  })
}

// 修改客户订单
export function updateOrders(data) {
  return request({
    url: '/service/orders',
    method: 'put',
    data: data
  })
}

// 删除客户订单
export function delOrders(id) {
  return request({
    url: '/service/orders/' + id,
    method: 'delete'
  })
}

//订单审核
export function checkReview_API(data) {
  return request({
    url: '/service/orders/review',
    method: 'post',
    data,
  })
}

//订单审核
export function listById(id) {
  return request({
    url: '/service/concrete/list-by-id/' + id,
    method: 'get'
  })
}
//订单详情
export function orderInfo(id) {
  return request({
    url: '/service/api/purchase_order/info/' + id,
    method: 'get'
  })
}